﻿<!-- Copyright (c) 2013, Dijji, and released under Ms-PL.  This, with other relevant licenses, can be found in the root of this distribution.
-->
    <Window x:Uid="Window_1" x:Class="TestDriver.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="File Meta Automated Test driver" Height="800" Width="1000" FontSize="12" Icon="/TestDriver;component/Resources/tag.ico"
        WindowStartupLocation="CenterScreen">
    <Window.CommandBindings>
        <CommandBinding Command="Copy" CanExecute="CommandBinding_CanExecute" Executed="CommandBinding_Executed"/>
    </Window.CommandBindings>
        <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition Height="50"/>
            </Grid.RowDefinitions>
            <ListBox Grid.Row="0"  Name="lbLog" ItemsSource="{Binding Path=Results}" >
                <ListBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Command="Copy" Click="CopyListBoxItem_Click" CommandTarget="{Binding Path=PlacementTarget,RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}" />
                    </ContextMenu>
                </ListBox.ContextMenu>
            </ListBox>
            <TextBox Grid.Row="2" Name="tbStatus" Text="{Binding Path=Status}"/>
        </Grid>
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition Height="50"/>
            </Grid.RowDefinitions>
            <ListBox Grid.Row="0"  Name="lbTests" ItemsSource="{Binding Path=Tests}" FontSize="12" SelectionMode="Multiple">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=Name}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Grid.Row="2" FlowDirection="RightToLeft" Orientation="Horizontal">
                <Button Content="Run All Tests" Name="RunAll" Margin="5,5,5,5" FontSize="12" Click="RunAll_Click" IsEnabled="{Binding Path=Idle}" />
                <Button Content="Run Selected Tests" Name="RunSelected" Margin="5,5,5,5" FontSize="12" Click="RunSelected_Click" IsEnabled="{Binding Path=Idle}" />
                <Button Content="Loop All Tests" Name="LoopAll" Margin="5,5,5,5" FontSize="12" Click="LoopAll_Click" IsEnabled="{Binding Path=IdleOrLooping}" />
             </StackPanel>
        </Grid>
    </Grid>
</Window>
